

#ifndef GFXCONV_H
#define GFXCONV_H


#ifndef PSDLITE_INCLUDED

// on change pas les bonnes habitudes...
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned long u32;

typedef signed char s8;
typedef signed short s16;
typedef signed long s32;

#endif


// les structures toutes basiques fournies par le parsing du fichier PSD...
typedef struct {
	const char * name;
	s16 x, y;
	u16 height, width;
	u8 visible, opacity;
	u32 * data;
	u8 type;
} layer_info;


typedef struct {
	u16 width, height;
	u16 nb_layers, nb_images, nb_hotspots, nb_colinfos;
	layer_info* layers;
} image_info;


#define XF_RGB(r,g,b) (((r)<<11) | ((g)<<5) | (b))


#define TYPE_IMAGE    1
#define TYPE_HOTSPOT  2
#define TYPE_COLINFOS 4


extern image_info image; // tout est copié là

#ifdef __cplusplus
extern "C" void Convert(int argc, char** argv); // sert de main pour le C, puisque l'analyse du PSD est en C++...
#else
extern void Convert(int argc, char** argv);
#endif

#endif

